function middle(width,height){
	   if (document.layers){
	     window.moveTo((screen.width-window.outerWidth)/2, (screen.height-window.outerHeight)/2);
	   } else {
	     window.moveTo((screen.width-500)/2, (screen.height-282)/2);
	   }
}

    function reloadMenu(){
        parent.menu.location.replace('cmsTreeView.php');
    }
    
    function checkVal (field)
    {
        if (field.value.match(/[^a-zA-Z0-9_\-\.]/))
            field.value = field.value.replace(/[^a-zA-Z0-9_\-\.]/g,'')
        return true
    }

                function __getElement (id)
                {
                  var obj
                  if (document.all)
                  {
                    obj = document.all[id]
                  }
                  else if (document.getElementById)
                  {
                    obj = document.getElementById(id)
                  }
                  else if (document.layers)
                  {
                    obj = document.layers[id]
                  }
                  return obj
                }
